<script setup>
import {onBeforeMount, onMounted, onUpdated, ref} from "vue";

let count = ref(0);
let elem = ref();

onBeforeMount(()=>{
  console.log(count.value)
  console.log(elem.value)
})

onMounted(()=>{
  console.log(count.value)
  console.log(elem.value)
})

onUpdated(()=>{
  console.log(count.value)
  console.log(elem.value)
})

setTimeout(()=>{
  count.value +=1 ;
},2000)
</script>

<template>
  <div>{{count}}</div>
</template>

<style scoped>

</style>